﻿@using IdentityServer4.Extensions

@{
    string name = null;
    if (!true.Equals(ViewData["signed-out"]))
    {
        name = Context.User?.GetDisplayName();
    }
}

<div class="nav-page">
    <nav class="navbar navbar-expand-lg navbar-dark bg-dark">

        <a href="~/" class="navbar-brand">
            <img src="~/icon.png" class="icon-banner">
            IdentityServer4
        </a>
        <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
            <span class="navbar-toggler-icon"></span>
        </button>



        <div class="collapse navbar-collapse" id="navbarSupportedContent">
            <ul class="navbar-nav mr-auto">
                <li class="nav-item">
                    <a class="nav-link" href="~/.well-known/openid-configuration">发现文档</a>
                </li>
                <li class="nav-item">
                    <a class="nav-link" href="~/diagnostics">Claims</a>
                </li>
                <li>
                    <a class="nav-link" href="~/grants">授权信息</a>
                </li>


            </ul>
            @if (!string.IsNullOrWhiteSpace(name))
            {
                <ul class="navbar-nav">
                    <li class="nav-item dropdown  my-2 my-sm-0">
                        <a href="#" class="nav-link dropdown-toggle" data-toggle="dropdown">@name <b class="caret"></b></a>

                        <div class="dropdown-menu">
                            <a class="dropdown-item" asp-action="Logout" asp-controller="Account">Logout</a>
                        </div>
                    </li>
                </ul>
 

            }

            </div>

    </nav>
</div>
